package com.wzq.controller.admin;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wzq.dao.pojo.*;
import com.wzq.service.ITypeService;
import com.wzq.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/admin/message")
public class AdminMessageController extends GetSome{
    /**
     * 添加消息
     * @param message
     * @return
     */
    @PostMapping("/disagree")
    public Result save(@RequestBody Message message ) {
        if ("管理员".equals(message.getName()) )
            return new Result(iMessageService.save(message) ? Code.SAVE_OK:Code.SAVE_ERR,null,"添加成功");
        return new Result(Code.SAVE_ERR,null,"添加失败!");
    }
}

